package com.boyunv.observer.example03;
/*
 *@description
 *
 *@author boyunv
 *@create 2023/8/12 15:20
 *@version 1.0
 */

import com.boyunv.observer.example02.DrawHouseService;
import com.boyunv.observer.example02.LotteryResult;

import java.util.Date;

public class LotteryServiceImpl extends LotteryService
{

 //注入摇号服务
 private DrawHouseService houseService=new DrawHouseService();


 @Override
 public LotteryResult lottery(String uId) {
  //1.摇号
  String result = houseService.lots(uId);
  return new LotteryResult(uId,result,new Date());
 }
}
